﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="INGRESOGARANTIA.aspx.vb" Inherits="IMSS.SA.Formulario_web16" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
    .style2
    {
        height: 15px;
        text-align: center;
    }
    .style3
    {
        height: 24px;
        text-align: center;
    }
    .style4
    {
        text-align: center;
    }
    .style5
    {
        height: 24px;
        width: 455px;
        text-align: center;
    }
    .style6
    {
        height: 15px;
        width: 455px;
        text-align: center;
    }
    .style9
    {
        text-align: center;
    }
        .style10
        {
            height: 26px;
            text-align: center;
        }
        .style11
        {
            text-align: center;
            width: 24px;
        }
        .style12
        {
            height: 24px;
            width: 24px;
            text-align: center;
        }
        .style13
        {
            height: 15px;
            width: 24px;
            text-align: center;
        }
        .style14
        {
            height: 26px;
            text-align: center;
            width: 24px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <table style="width:100%; color: #FFFFFF; background-color: #006699; background-image: url('../Styles/r3.PNG'); background-repeat: no-repeat;">
    <tr>
        <td class="style11">
            &nbsp;</td>
        <td class="style9" colspan="2">
            &nbsp;</td>
    </tr>
    <tr>
        <td class="style11">
            &nbsp;</td>
        <td class="style9" colspan="2">
            <asp:Label ID="Label1" runat="server" Text="Label" Visible="False"></asp:Label>
        </td>
    </tr>
    <tr>
        <td class="style11">
            &nbsp;</td>
        <td class="style9" colspan="2">
            &nbsp;</td>
    </tr>
    <tr>
        <td class="style11">
            &nbsp;</td>
        <td class="style9" colspan="2">
            INGRESO DE DATOS DE GARANTIA</td>
    </tr>
    <tr>
        <td class="style11">
            &nbsp;</td>
        <td class="style4">
            &nbsp;</td>
        <td class="style9">
            &nbsp;</td>
    </tr>
    <tr>
        <td class="style11">
            &nbsp;</td>
        <td class="style4">
            ID_GARANTIA</td>
        <td class="style9">
            <asp:TextBox ID="GARANTIA" runat="server" MaxLength="15"></asp:TextBox>
        </td>
    </tr>
    <tr>
        <td class="style12">
            &nbsp;</td>
        <td class="style5">
            FECHA INICIAL</td>
        <td class="style3">
            <asp:TextBox ID="FECHAINICIAL" runat="server" MaxLength="15"></asp:TextBox>
        </td>
    </tr>
    <tr>
        <td class="style13">
            &nbsp;</td>
        <td class="style6">
            FECHA FINAL</td>
        <td class="style2">
            <asp:TextBox ID="FECHAFINAL" runat="server" MaxLength="15"></asp:TextBox>
        </td>
    </tr>
    <tr>
        <td class="style14">
            &nbsp;</td>
        <td class="style10">
            DESCRIPCION</td>
        <td class="style10">
            <asp:TextBox ID="DESCRIPCION" runat="server" MaxLength="15"></asp:TextBox>
        </td>
    </tr>
    <tr>
        <td class="style11">
            &nbsp;</td>
        <td class="style4">
            &nbsp;</td>
        <td class="style9">
            &nbsp;</td>
    </tr>
    <tr>
        <td class="style11">
            &nbsp;</td>
        <td class="style4">
            <asp:Button ID="ENVIAR" runat="server" Text="ENVIAR" />
        </td>
        <td class="style9">
            <asp:Button ID="BORRAR" runat="server" Text="BORRAR" />
        </td>
    </tr>
    <tr>
        <td class="style11">
            &nbsp;</td>
        <td class="style4" colspan="2">
            &nbsp;</td>
    </tr>
    <tr>
        <td class="style11">
            &nbsp;</td>
        <td class="style4" colspan="2">
            <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                DataKeyNames="Id_garantia" DataSourceID="SqlDataSource1">
                <Columns>
                    <asp:BoundField DataField="Id_garantia" HeaderText="Id_garantia" 
                        ReadOnly="True" SortExpression="Id_garantia" />
                    <asp:BoundField DataField="Fecha_inicial" HeaderText="Fecha_inicial" 
                        SortExpression="Fecha_inicial" />
                    <asp:BoundField DataField="Fecha_final" HeaderText="Fecha_final" 
                        SortExpression="Fecha_final" />
                    <asp:BoundField DataField="Descripcion" HeaderText="Descripcion" 
                        SortExpression="Descripcion" />
                </Columns>
            </asp:GridView>
            <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                ConnectionString="<%$ ConnectionStrings:IMSS.SAConnectionString10 %>" 
                DeleteCommand="DELETE FROM [GARANTIA] WHERE [Id_garantia] = @Id_garantia" 
                InsertCommand="INSERT INTO [GARANTIA] ([Id_garantia], [Fecha_inicial], [Fecha_final], [Descripcion]) VALUES (@Id_garantia, @Fecha_inicial, @Fecha_final, @Descripcion)" 
                SelectCommand="SELECT [Id_garantia], [Fecha_inicial], [Fecha_final], [Descripcion] FROM [GARANTIA]" 
                UpdateCommand="UPDATE [GARANTIA] SET [Fecha_inicial] = @Fecha_inicial, [Fecha_final] = @Fecha_final, [Descripcion] = @Descripcion WHERE [Id_garantia] = @Id_garantia">
                <DeleteParameters>
                    <asp:Parameter Name="Id_garantia" Type="String" />
                </DeleteParameters>
                <InsertParameters>
                    <asp:ControlParameter ControlID="GARANTIA" Name="Id_garantia" 
                        PropertyName="Text" Type="String" />
                    <asp:ControlParameter ControlID="FECHAFINAL" DbType="Date" Name="Fecha_inicial" 
                        PropertyName="Text" />
                    <asp:ControlParameter ControlID="FECHAFINAL" DbType="Date" Name="Fecha_final" 
                        PropertyName="Text" />
                    <asp:ControlParameter ControlID="DESCRIPCION" Name="Descripcion" 
                        PropertyName="Text" Type="String" />
                </InsertParameters>
                <UpdateParameters>
                    <asp:Parameter DbType="Date" Name="Fecha_inicial" />
                    <asp:Parameter DbType="Date" Name="Fecha_final" />
                    <asp:Parameter Name="Descripcion" Type="String" />
                    <asp:Parameter Name="Id_garantia" Type="String" />
                </UpdateParameters>
            </asp:SqlDataSource>
        </td>
    </tr>
    <tr>
        <td class="style11">
            &nbsp;</td>
        <td class="style4" colspan="2">
            &nbsp;</td>
    </tr>
    <tr>
        <td class="style11">
            &nbsp;</td>
        <td class="style4">
            &nbsp;</td>
        <td>
            &nbsp;</td>
    </tr>
</table>
</asp:Content>
